package com.chujian.framework.ws;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class WsResult {

    public static final int SUC_CODE = 0;
    public static final int FAIL_CODE = -1;

    private int code;
    private String msg;
    private Object data;

    public WsResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public boolean isSuccess() {
        return code == 0;
    }

}
